J1-P31-Fx BASE

J1-P31

1. Informations

Document: MIMJ1P31F BASE
Description: Installation and maintenance manual
Editor: Riccardo Furlato
Approver Gabriele Bazzi
Link: https://www.qem.eu/doku/doku.php/strumenti/qmoveplus/j1P31/mimj1P31fx_base
Language: English
Document release Hardware release Description Note Date
01 02 New manual Valid from software release 1P31F-xx.5.3 05/12/2012
02 02 Adding the 1MG5F card / 06/03/2013
03 02 New “BASE” varsion of this manual / 12/02/2015
04 02 Added the section “General information” / 03/11/2015

CE Marking and reference standards

The controller has been designed for industral environments in conformity to EC directive 2004/108/CE.

  • EN 61000-6-4: Electromagnetic compatibility - Generic standard on emission for industrial environments
    • EN55011 Class A: Limits and measurement methods
  • EN 61000-6-2: Electromagnetic compatibility - Generic standard on immunity for industrial environments
    • EN 61000-4-2: Electromagnetic compatibility - Electrostatic discharge immunity
    • EN 61000-4-3: Immunity to radiated, radio-frequency electromagnetic field
    • EN 61000-4-4: Electrical fast transients
    • EN 61000-4-5: Surge immunity
    • EN 61000-4-6: Conducted disturbance induced by radio-frequency
  • Moreover the product is conform to the following standards:
    • EN 60529: Housing protection rating IP64
    • EN 60068-2-1: Environmental testing: Cold
    • EN 60068-2-2: Environmental testing: Dry heat
    • EN 60068-2-14: Environmental testing: Change of temperature
    • EN 60068-2-30: Environmental testing: Cyclic damp heat
    • EN 60068-2-6: Environmental testing: Sinusoidal vibration
    • EN 60068-2-27: Environmental testing: Shock vibration
    • EN 60068-2-64: Environmental testing: Random vibration

2. Description

The J1-P31-F is a combo HMI-PAC controller of the Qmove+ range.

2.1 Product Identification

:tip:The Ordering Code provides the exact product features.
Make sure that the product characteristics meet your requirements.

2.1.1 Product Label

2.1.2 Ordering Code

Model Features
J1-P31-FA-10/TP01
TP00 = Keypad code (TP00 = panel with resistive, logo and custom function keys);
TP01 = panel with resistive touch-screen, logo and QEM standard function keys
10 = Firmware version (00 = not installed)
F = Technology level
A = Hardware version
P = Basic keypad (only function keys)
3 = 7” LCD graphic display, TFT-256 COLORS-800x480px; front panel dimensions (216x168mm); keypad 7 keys + 11 led; housing to DIN 43700;
1 = Firmware-hardware correspondence
J1 = “HMI+PLC” Qmove family

2.1.3 Hardware Versions

These are hardware versions currently available:

Hardware versions
A B C D E F G H I J K L M Y W Z
SLOT 2
(Base card)
USER PORT 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
AUX1 PORT (RS232, RS422, RS485) - - - - - - - - - - - - - - - 1
AUX2 PORT (RS485) - - - - - - - - - - - - - - - 1
CAN1 PORT 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
CAN2 PORT1) - - - - - - - - - - - - - - - -
ETHERNET PORT - - - - 1 1 - 1 - - 1 1 1 1 1 1
USB PORT2) - - - - - - - - - - - - - - - -
SLOT 3
(Specialization
cards)
Standard digital inputs - 16 16 16 16 16 16 16 16 16 16 16 16 16 - 16
Rapid digital inputs3) - 2 2 2 2 2 2 2 2 2 2 2 2 2 - 2
Analog inputs 12bit - 2 2 2 2 2 2 2 2 2 2 4 2 2 - 2
Analog inputs 16bit - - - - - - - - - - - - - - - -
PT100 inputs4) - - - - - - - - - - - - - - - -
Termocouple inputs5) - - - - - - - - - - - - - - - -
Bidirectional counters 20KHz ABZ
(24V-PP, 5V-LD)
- - - - - - - - - - - - - - - -
Bidirectional counters 200KHz ABZ
(24V-PP, 5V-LD)
- 2 4 2 2 4 4 2 2 4 4 2 - 4 - 4
SSI absolute counters - - - - - - - - - - - - - - - -
Protected digital outputs - 8 8 8 8 8 8 16 16 16 16 16 16 8 - 8
Relay digital outputs - - - - - - - - - - - - - - - -
Analog outputs 0-10V-12bit - - - - - - - - - - - - - - - -
Analog outputs +/-10V-16bit - 2 4 2 2 4 4 2 2 4 4 2 - 4 - 4
Stepper outputs - - - 2 - - 4 - 2 - - - - 4 - 4
Remote keyboards connector6) - - - - - - - - - - - - - 1 - 1
Card software code
declared in SLOT 3
-

1), 2), 4), 5), 6) option not currently enabled
3) 2 rapid inputs can be used as frequency meters inside the “FREQ” device

2.1.4 Expansion card manuals

icona_mim-card.jpg1MG3F rel.02

icona_mim-card.jpg1MG5F rel.01

2.1.5 Firmware versions

VersionDescription
10 Fully programmable with PLC functions
20 Fully programmable with PLC and Motion control functions
30 Fully programmable with PLC, Motion control, Camming and Interpolation functions

For more details about the firmware, consult Devices enabled in the controllers.

2.2 Product Configuration

2.2.1 Front panel

A) Function keys and led's
B) System led's

2.2.2 Back terminal blocks

The J1-P31-F s composed of a “base” card and an “expansion” card.

3. Technical features

3.1 General features

Weight (full hardware)1Kg
HousingSheet metal
Front panelAlluminium
Outer FrameSelf-extinguishing Noryl
DisplayLCD 7'' TFT 256 colors - 800 x 480px
Touch screenwire Resistive
Display dimensions152,4 x 91,4mm / 7“
User led's14
System led's8
Function keys7
System keys3
Operating temperature0 ÷ 50°C
Transport and storage temperature-25 ÷ +70 °C
Relative humidity90% condensate free
Altitude0 - 2000m s.l.m.
Front protection ratingIP64

3.2 CPU (F level technology)

RISC microprocessor (32 bit)
Work frequency 200MHz
RAM 16MB
Flash 8MB

3.3 Dimensions

:info:Lengths in mm

3.4 Hole template

3.5 Installation

Fit the controller in the hole.

Apply the brackets.

:important: Before fixing the controller, check it is mounted firmly in the hole and the gasket under the frame makes a good seal. No liquids must enter and the frame must not deform.

Screw the controller in place.

:important:Warning: after putting the pin of fixing, do only half rotation to not tear the frame!

4. Base card wiring

:tip:For details about cable sections and connectors, see application note AN021

4.1 Power Supply

:todo:The cabling must be carried out by specialist personnel and fitted with suitable anti-static precautions.
Before handling the controller, disconnect the power and all parts connected to it.
To guarantee compliance with EC regulations, the power supply must have a galvanic isolation of at least 1500Vac.

.

Power supply 24 Vdc
Voltage range 22 - 27 Vdc
Max. absorption 30W

Connector

CN1 TerminalSymbolDescription
1 + DC power positive
2 GROUND Gnd-PE (signals)
3 - DC power 0V

Connection examples

:todo:Use an isolated power unit with 24Vdc +/-5% output conform to EN60950-1.

.

Use two separate power units: one for the control circuit and one for the power circuit
For a single power unit, use two separate lines: one for the control and one for the power
DO NOT use the same lines for the power circuit and the controller

4.2 Serial Port Connections

4.2.1 PROG PORT

PROG PORTDescription
Serial port used for the transfer and debugging of the application program in the CPU.
Use only with IQ009 or IQ013.

4.2.2 USER PORT

Connector
CN2 TerminalRS232RS422RS485Description
1A - - A Terminal A - RS485
2A - - B Terminal B - RS485
3A 0V 0V 0V USER PORT common
4A 0V 0V 0V USER PORT common
5A TX - - Terminal TX - RS232
6A Terra
1B - RX - Terminal RX - RS422
2B - RXN - Terminal RX N - RS422
3B - TX - Terminal TX - RS422
4B - TXN - Terminal TX N - RS422
5B RX - - Terminal RX - RS232
6B Ground
Setup of USER PORT electric standard
SW2 Num.
Dip
Name
DIP
Setting
of DIP
Function
1 JP2 ON X1) X2) Termination RS485
2 JP3 ON X3) X4) Polarization RS485
3 JP1 ON X5) X6)
4 OFF ON OFF Selection of USER PORT electric standard
5 ON OFF OFF
6 OFF OFF ON
RS485 RS422 RS2327)

1), 2), 3), 4), 5), 6) X = setting not significant
7) the USER PORT can be used as PROG PORT with RS232 electric standard, setting ON in DIP-8 of SW1 and OFF in DIP-6 of SW2

4.2.3 AUX1 PORT

Connector
CN3 TerminalRS232RS422RS485Description
1A - - A Terminal A - RS485
2A - - B Terminal B - RS485
3A 0V 0V 0V USER PORT common
4A 0V 0V 0V USER PORT common
5A TX - - Terminal TX - RS232
6A Ground
1B - RX - Terminal RX - RS422
2B - RXN - Terminal RX N - RS422
3B - TX - Terminal TX - RS422
4B - TXN - Terminal TX N - RS422
5B RX - - Terminal RX - RS232
6B Ground
Setup of AUX1 PORT electric standard
SW3 Num.
Dip
Name
DIP
Setting
of DIP
Function
1 JP2 ON X1) X2) Termination RS485
2 JP3 ON X3) X4) Polarization RS485
3 JP1 ON X5) X6)
4 - OFF ON OFF Standard USER PORT settings
5 - ON OFF OFF
6 - OFF OFF ON
- - RS485 RS422 RS232

1), 2), 3), 4), 5), 6) X = setting not significant

4.2.4 AUX2 PORT

Connector
CN4 TerminalSymbolDescription
cnn_3fv_p3.5_03.jpg 1 0V RS485 serial common
2 B Terminal RS485 B
3 A Terminal RS485 A
Setup of AUX2 PORT polarisation and termination resistances
SW4 Num.
Dip
Name
Dip
Setting
of DIP
Function
dip-4.jpg 1 JP3 ON Polarization RS485
2 JP2 ON Termination RS485
3 JP1 ON Polarization RS485
4 X1) None

1) X = setting not significant

4.2.5 CANbus PORT

Connectors
CN5-CAN1 PORT
CN6-CAN2 PORT
TerminalSymbolDescription
cnn_3fv_p3.5_03.jpg 1 0V CAN common
2 CAN L Terminal CAN L
3 CAN H Terminal CAN H
Setup of CAN1 and CAN2 PORT Termination resistances
SW5 Num.
Dip
Name
Dip
Setting
of DIP
Function
dip-4.jpg 1 JP1 ON CAN1 Termination
2 JP2 ON
3 JP1 ON CAN2 Termination
4 JP2 ON
:todo:When activating the CAN1 port termination, set dip's JP1 and JP2 to ON.
When activating the CAN1 port termination, set dip's JP1 and JP2 to ON.

4.2.6 Ethernet

ETHERNET PORTDescription
Connector RJ45.

LED:
* LINK: green led = cable connected (led on signals the cable is connected to both ends)
* DATA: yellow led = data transmission (flashing led signals data transmission)

4.2.6.1 MMC/SD

Memory card slot (marked by an arrow)

5. Electrical features

The electrical characteristics of the hardware are given below.
The maximum and minimum frequencies, and real acquisition times, may depend on eventual additional software filters “QMOVE:sys004” section variables of system.

5.1 PROG PORT

Connector for IQ009 or IQ013

:important: The USB mini-B connector does not support USB electrical standards, it can only be used with an interface IQ009 or IQ013.

It is used for the transfer and debugging of the application program in the CPU.

Electrical standard TTL (Use serial interface IQ009 or IQ013)
Communication speedMin. 9.6 Kbaud - max 115200 Kbaud
settable by dip1 and 2 of the switch SW1
InsulationNone

.

Connection between Qmove+ e PC using the accessory IQ009

.

Connection between Qmove+ and a device fitted with a RS232 serial port (e.g. a MODEM), using the interface IQ013

5.2 RS232

Communication speed4800, 9600, 19200, 38400, 57600, 115200 baud
Communication modeFull duplex
Operating modeReferred to 0V
Max. number of devices connected on the line1
Max. cable length15 m
Input impedence> 3 Kohm
Short-circuit current limit7 mA

Internal wiring diagram of RS232

Cable connection diagram of RS232

5.3 RS422

Communication speed4800, 9600, 19200, 38400, 57600, 115200 baud
Communication modeFull duplex
Operating modeDifferential
Max. number of devices connected on the line1
Max. cable length1200 m
Input impedence> 12 Kohm
Short-circuit current limit35 mA

Internal wiring diagram of RS422

Cable connection diagram of RS422

Cable connection diagram of RS422

5.4 RS485

.

Communication speed4800 baud (only if used with SERCOM and/or MODBUS device),
9600 baud, 19200 baud, 38400 baud, 57600 baud
Communication modeHalf duplex
Operating modeDifferential
Max. number of devices connected on the line32
Max. cable length1200 m
Input impedence> 12 Kohm
Short-circuit current limit35 mA

Internal wiring diagram of RS485

Cable connection diagram of RS485

5.5 CANbus

To activate the internal termination resistance see paragraph Setup Termination resistances

.

Communication speed125, 250, 500, 1000 Kbit/s
Max. number of Drivers/Receivers on the line100
Max. cable lengths500m @ 125Kbit/s, 250m @ 250Kbit/s, 100m @ 500Kbit/s, 25m @ 1000Kbit/s
Input impedence>15Kohm
Short-circuit current limit45mA

Schema elettrico interno canbus

Schema del cavo di collegamento canbus

Esempio di collegamento CANbus

CAN BUS connection examples.

Caution:
Close DIP's JP1 and JP2 and insert the termination resistances (RL, RH) on the last device of the chain.

5.6 Ethernet

Ethernet Interface 10/100 Base T (IEEE 802.3) on RJ45 connector.

Connection between Qmove + and PC:

Qmove+ Cross-over cable EIA/TIA-568A/B PC

5.7 MMC/SD

Type of Memory Card to useMMC, SD and SDHC up to 8GB
For proper operation it is necessary that the device conforms to the standards set by “SD Association” (www.sdcard.org) or “Multi Media Card Association” (www.mmca.org).

.

:important:To use the Memory Cards they must first be formatted with FAT16 or FAT32 file system.

6. Settings, procedures and signals

Rear view to identify the apparatus illustrated in this chapter.

6.1 PROG PORT and USER PORT Baud-rate selector

SW1 DipDIP settingsFunction
dip-8.jpg 1 OFF OFF ON ON Select PROG PORT transmission speed
2 OFF ON OFF ON
Baud-rate
38400
Baud-rate
115200
Baud-rate
19200
Baud-rate
57600
3 OFF OFF ON ON Select USER PORT transmission speed
4 OFF ON OFF ON
Baud-rate
38400
Baud-rate
115200
Baud-rate
19200
Baud-rate
57600
5 CANbus baud-rate selector. See paragraph CANbus baud-rate selector
6 OFF ON Select PROG PORT functioning mode
PROG PORT can also be used by SERCOM and MODBUS devicesPROG PORT cannot be used by SERCOM and MODBUS devices
7 CANbus baud-rate selector. See paragraph CANbus baud-rate selector
8 OFF ON Select the USER PORT as PROG PORT1)
PROG PORT normalPROG PORT on USER PORT connector

1) It is possible to use the USER PORT connector as PROG PORT with RS232 electric standard, doing this the mini-USB connector of the PROG PORT is disconnected (Setting USER PORT electric standard). For this function mode also set dip 6 of SW2 to OFF.

6.2 Baud-rate CANbus selector

SW1 DipDIP settingsFunction
dip-8.jpg 1 - -
2 - -
3 - -
4 - -
5 OFF ON OFF ON Select speed of
CANbus transmission
7 OFF OFF ON ON
Baud-rate
125KB/S
Baud-rate
250KB/S
Baud-rate
500KB/S
Baud-rate
1MB/S
6 - -
8 - -

6.3 Led

The system leds “pow, run, stop, err” are found on the front panel and on the rear of controllers with display and only on the top of controllers without display.

The user leds “L1, L2, L3 e L4” are found on the rear:

“System Leds” Signals

Leggend:

led_on.jpg Led ON

led_off.jpg Led OFF

led_lamp.jpg Led Blinking

LedColourStatusDescription
powGreenled_on.jpgPower on
led_on.jpgOnly this led on, signals the CPU reset status
runGreenled_on.jpgCPU in RUN status
led_lamp.jpgCPU in READY status
stopYellowled_on.jpgWith pow on, signals the STOP status of the CPU
With pow off, signals the BOOT status of the CPU
errRedled_lamp.jpgWith pow off, signals a hardware error. See paragraph Hardware Error codes
With pow blinking, the flash rate gives the type of error. See paragraph err led signals

Err led signals

N.
flashes
ErrorDescriptionRecommended action
1 Bus errorBus configuration different to application software.Check the correspondence between the QMOVE application (BUS section of configuration unit) and the product configurations (cards mounted in BUS).
2 CheckSum ErrorNegative outcome on the integrity control of retentive variables . (see Reset Error Checksum)Restore the machine data from a backup (.DAT file) or cancel the error with in system functions and enter the values manually.
3 Index Out of BoundAn array index is pointing on an inexistent elementOpen a unit editor in Qview development environment and use the “Edit→Go to PC” command to find the program line that is cause of the error. In general the index value has a value <1 or >array dimension.
4 Program Over RangeThe program selection index in the DATAGROUP has attempted to access an inexistent program.With the Qview development environment open the editor of a unit and user the “Edit→Go to PC” command to highlight the program line that has caused the error. In general the value used as index is lower than 1 or over the array dimension.
5 Step Over RangeThe step selection index in the DATAGROUP has attempted to access an inexistent step.With the Qview development environment open the editor of a unit and user the “Edit→Go to PC” command to highlight the program line that has caused the error. In general the value used as index is lower than 1 or over the array dimension.
6 Division By ZeroThe denominator of a division operation of the application program has a zero value.With the Qview development environment open the editor of a unit and user the “Edit→Go to PC” command to highlight the program line that has caused the error.
7 Syntax ErrorThe application program has an invalid instructionThis error may appear because the program counter has met the QCL END instruction.
8 Watch Dog ErrorA CAN module does not function correctly, or a specialist card has a hardware problemWith the Qview development environment open the “Monitor→Bus” panel and the righthand column called “Watchdog Bus” indicates the card that caused the problem.
9 Stack ErrorThe applciation program has used all permitted levels of calls to subroutinesWith the Qview software environment open the editor of a unit and use the “Edit→Go to PC” command to highlight the program line that caused the error. Analyse the unit execution flow, the call to subroutines nestings have a limit, over which this error is generated.

Hardware error codes

During the startup sequence, if a malfunction of any peripheral is detected, the system blocks and the error is signaled by the flashing led led_lamp.jpgerr while the other system led's remain off.

The number of flashes indicates the type of error according to the following table :

Number of flashesError
1 Display
2 FPGA
3 Media
4 Bootloader
5 FW
6 Bus
7 Signal not active
8 Signal not active
9 Exception

.

:important:Each of these signals indicates a serious error situation. The product must be sent to the QEM aftersales service.

“User Led” signal

LedColourDescription
led_on.jpg L1YellowProgrammable in the application program by the QMOVE system variable:sys003 and used by the system functions
led_on.jpg L2
led_on.jpg L3
led_on.jpg L4

6.4 Keys

NameDescription
pulsante_6x6.jpgFUNCPress on startup of the controller to access the System functions
pulsante_6x6.jpgBOOTPress on startup of the controller to set the CPU in Boot status and then access the firmware update functions
pulsante_6x6.jpgRESETReset CPU. the system is restarted restoring the initial conditions (after a startup )

7. General information of operation

7.1 Introduction

This chapter will introduce some concepts and describes some operations of the product. These contents are partly related and implemented in firmware. This software implements all features that allow the product to be a component of the system programmable Qmove.

7.2 Organizing data and memories

To best understand the terms used in this chapter, it is important to know the organisation of data and memory in a QMOVE application. QMOVE applications are programs written in QCL language that, translated in binary code, are transferred onto QMOVE hardware and saved there. In the hardware, the microprocessor runs has a program called firmware that interprets the above binary code instructions and performs the operations associated to them.

A QCL application, in addition to the instructions, is also composed of variables that the QCL instructions act on.. Some of these variables are retentive, i.e. their values remain unaltered from shut-off to start up. The flow chart below illustrates the organisation of data in a QCL application transferred to the memory of any QMOVE hardware:

It can be noted that, the QMOVE hardware has several mass storage devices:

“Flash memory”, where the following is saved:

“Non volatile memory”, which stores:

“Volatile memory”, which stores:

The volatile data memory is also used as dynamic memory. i.e. the memory used by the firmware for internal operations and active HMI screen management.

“Mass storage internal device” is managed by a standard filesystem and is useful to save information by the DATASTORE device (read - write binary or csv files with recipes, logs, variuous setups, etc).
It 'also used to store the backup of the application QMOVE and other service files.

“Mass storage external device” is managed by a standard filesystem and is useful for loading the QMOVE application, data loading/saving, firmware update or to save informations by the DATASTORE device.

7.3 CPU status

The CPU has several operating statuses. The figure below shows the main status changes from the controller startup.
The main operating statuses are RESET, READY, RUN and STOP.
The CPU events that determine a transition from one status to another are mainly linked to commands being sent by the development environment: Run, Reset, Stop and Restart.
Application download is the development environment procedure that allows to transfer a QMOVE application to the CPU.

Stati della CPU

BOOT state

The BOOT state can be used to access the firmware updating functions.

SELF-DIAGNOSIS state

During the startup, after scanning the system led's, the controller performs a series of self-diagnostic operations. When any faults are detected or the operator has to be informed of any given situation, the self-doagnosis procedure is temporarily interrupted, signalling the event.
The fault signal is made by led's L1, L2 and a message is given on display (if present).

System Messages
n.Led ONSystem Message (if display present)DescriptionType
1led_on.jpg L1System Data WRITE ERRORIndicates that a write error has occurred during the configuration data saving. B
2led_on.jpg L2System Data IS RESTORED FROM DEFAULTIndicates that the configuration data has been restores to the default settings. C
3led_on.jpg L1
led_on.jpg L2
System Data is updated
Please verify new data
Indicates that the configuration data has been converted into a new format. Check that the previous settings have been maintained. C
4led_on.jpg L3Firmware is updated
old: 1K31F10 1.001
new: 1K31F10 1.002
Indicates that a firmware update has been made. C

When the condition detected allows to continue to the start stage (type C) and waits for the FUNC button or for the F1 key to be pressed to continue the boot procedure.

If not provided with a display, the controller waits 5 seconds before continuing with the startup stage, without waiting for a button to be pressed.

When the situation does not allow to continue the startup stage (tipo B), the controller, if provided with a display, shows the message“PLEASE TURN OFF AND TURN ON THE SYSTEM” and remains in this state until you turn off. If the controller is not provided with a display, the led led_lamp.jpg err flashes continuously.

SYSTEM BOOTING state

During the SYSTEM BOOTING state instruments with displays, displays some important information about the system as in the example shown in the following figure:

:important:WARNING: The values shown in the figure are examples and may vary according to the instrument.
List of the information displayed
n.MessageDescription
1 Boot status: POWER-ONIt displays the status of the boot:
POWER-ON Switching on the instrument
INIT Download application initialization
RESTART Restarting the instrument software
BACKUP Performing the Backup
RESTORE Performing the Restore
2 Firmware: 1K31F-30.5.6They show the name, version, major releases and minor releases of firmware. In the example we have:
1K31F Firmware name
30 Version
5 Major release
6 Minor release (build)
3 S/N: 12345678This displays the serial number of the instrument.
4 Date(DMY)/Time: 31/12/2010 - 12:34:56The clock/calendar is displayed in the format:
DD/MM/YYYY - hh:mm:ss
5 Dip-Switch = 0x2EIt displays a hexadecimal value representing the status of the switch SW1.
It is equivalent to the value of the system variable SYS002.
6 MMC: PRESENT 510/31250 KBIf a MMC/SD is inserted into the slot, at this stage we are displayed device data such as KB used (510) and KB total (31250).
In the case where the device is not present is displayed “not present !”
7 NAND: PRESENT 40510/63794 KBIt checks for all of the internal NAND, and then displays the KB used and KB total.
In the case where the device is not detected, an error is reported and is displayed “NAND: NOT PRESENT !”
8 Touch Screen: PRESENTInstruments equipped with a touch screen, it is detected and then are verified the calibration data.
In the event that has yet to be performed calibration, the message diplayed is “CALIBRATION REQUIRED !”.
The touchscreen calibration is possible with the system function “Touch Calibration”.
9 ETHERNET: IP = 192.168.0.253
NM = 255.255.255.0
GW = 0.0.0.0
On instruments equipped with Ethernet interface, displays the parameters IP address (IP), subnet mask (NM) and Gateway (GW).
Changing these values is possible with the system function “Set Ethernet communic. parameter” or through special programs available within the development environment.
10 BACKUP: VALID
QCL App: 25/04/2001 - 16:58:07 MATCH
QCL Dat: 25/04/2001 - 16:58:37 MATCH
QTP App: 25/04/2001 - 17:01:15 MATCH
It is checked for a valid backup in NAND and then displays the data of date and time of backup files relating to the application QCL (QCL App), the application data QCL (QCL Dat) and to the application QTP (QTP App).
If after “BACKUP” is displayed “VALID” means that the backup can be successfully restored by system function “Restore from NAND”.
If after “BACKUP” appears “NOT PRESENT” it means that the backup is not present.
If after “BACKUP” is displayed “NOT VALID” means that the backup can not be restored properly as the checksum of the three files that make up are not consistent with each other. After each file (QCL App, QCL Dat and QTP App), in addition to the information of the date and time of creation, is also displayed further information:
“MATCH” indicates that the file is consistent with the running application.
“NO MATCH” indicates that the file is not consistent with the running application.
“SIZE ERROR” indicates that the size of the file is invalid, possibly because the writing procedure was not completed correctly.
“NOT PRESENT” indicates that the file is not present.
11 Press F1/FUNC for 2s to System FunctionsThe display of this message indicates that the pressure for at least 2 seconds of the F1 key or the FUNC button provides access to system functions as described in the procedure. The message is displayed for 4 seconds.
12 !!! WARNING detected !!!
Press FUNC or F1 to continue
If during the previous phases, they are displayed some warning messages, which do not affect the operation of the system, to allow the operator to easily read the screen is waited a time of about 20 seconds.
To not wait and go before, press the F1 key or the FUNC button.
13 !!! ERROR detected !!!
Press FUNC or F1 to continue
Message displayed if the previous phases are displayed some error messages.
To continue, press the F1 key or the FUNC button.

SYSTEM FUNCTIONS status

The SYSTEM FUNCTIONS status can be used to access the SYSTEM FUNCTIONS, which are special procedures that allow the user to perform various operations. For more details see the System Functions chapter.



RESET status

Led statusled_on.jpgpow
led_off.jpgrun
Status causeNo application in memory.
The condition that can put the CPU in this statusRESET command.

This condition can only pass onto a READY status by downloading the applicaiton, using the Qview6 development environment.



READY status

Led statusled_on.jpgpow
led_lamp.jpgrun
Status causeApplication valid and waiting for execution.
Conditions that can put the CPU in this statusApplication download.

This condition can pass onto to the RUN or RESET statuses.



RUN status

Led statusled_on.jpgpow
led_on.jpgrun
Status causeApplication in execution.
Condition that can put the CPU in this statusRUN command.

This condition can pass onto all other CPU statuses.



STOP status

Led statusled_on.jpgpow
led_on.jpgstop » led_off.jpgrun
Status causeStop on application in execution.
Condition that can put the CPU in this statusA breakpoint has been encountered in the application code interpretation.

This condition can pass onto all other CPU statuses.

7.4 System functions

:important: IMPORTANT: The use of these procedures could represent a risk (e.g. deletion of application), therefore it is highly recommended that they are performed by qualified experts.

The system functions are speficic procedures that allow the user to perform various operations, e.g. the configuration/calibration of peripherals, data and application save/restore on/from removable mass memory, deletion of the application and management of the mass memories.
Controllers with display have some system functions that are only accessible by password and if access attempts are made the “Function is locked” message is given.

All the system functions are listed below.
If the “PWD” column shows 'Y', this means that the function requires a system password (default: “123”).
DEVICE indicates an external storage media. MMC / SD or USB for hardware that they have the port.

System Functions

n.Led ONSystem FunctionsPWDDescription
1led_on.jpgL101 - Reset Error Checksum - Reset checksum error.
NOTE: if the checksum error is present, the led led_on.jpg L1 flashes.
2led_on.jpgL202 - Copy all files DEVICE → NAND - Copy all files from DEVICE to NAND Flash memory.
3led_on.jpgL1
led_on.jpgL2
03 - Copy all files NAND → DEVICE - Copy all files from NAND Flash memory to DEVICE.
4led_on.jpgL304 - Application delete Y Delete the application.
5led_on.jpgL1
led_on.jpgL3
05 - Application upload from DEVICE Y Upload the application from DEVICE.
6led_on.jpgL2
led_on.jpgL3
06 - System Settings - Adjust the system clock and selection of the DEVICE (only for hardware that possess both ports).
7led_on.jpgL1
led_on.jpgL2
led_on.jpgL3
07 - Downl. retentive data to DEVICE - Save the retentive data on DEVICE.
8led_on.jpgL408 - Set NEW Password Y Set a new password to access the “locked” system functions.
9led_on.jpgL1
led_on.jpgL4
09 - Remove all files from NAND Flash Y Cancel all files stored on the NAND Flash memory.
10led_on.jpgL2
led_on.jpgL4
10 - Show NAND Flash files - List the files stored on the NAND Flash memory.
11led_on.jpgL1
led_on.jpgL2
led_on.jpgL4
11 - Touch Calibration - Run the calibration procedure of the Touch Screen, if present.
12led_on.jpgL3
led_on.jpgL4
12 - Set Ethernet communic. parameter - Run the setup procedure for the Ethernet communication parameters (IP address,…, etc.).
13led_on.jpgL1
led_on.jpgL3
led_on.jpgL4
13 - Backup to NAND - Run the backup of the QCL application, data and HMI application on NAND memory.
14led_on.jpgL2
led_on.jpgL3
led_on.jpgL4
14 - Restore from NAND Y Run the restore of the QCL application, data and HMI application from NAND memory.
15led_on.jpgL1
led_on.jpgL2
led_on.jpgL3
led_on.jpgL4
15 - Firmware Upgrade Y Run the firmware upgrade from DEVICE.
Available only in some hardware.

Note: To exit system functions press the keep the F1 key or FUNC button for at least two seconds.

Access to system functions

:tip:To access the System Functions, start up the controller with FUNC button or F1 key pressed.

The QMOVE application, if present, it not executed and the led L1 lights up.
Tools that have a display appears “SYSTEM FUNCTIONS”.

:tip:Use FUNC button or F1 key to scroll through the functions.
The selected function is indicated by the combination of L1-L2-L3-L4 leds lighted up and in instruments that have a display, you see the selected function in the “SYSTEM FUNCTIONS”.

The “System Functions” table gives the list of system functions and related led combinations.

:tip:Press BOOT button or F2 key for 2 seconds to execute the selected function.
The POW led starts flashing to indicate that the selected function is being executed.

Instruments that have a display, you see the page “SYSTEM FUNCTIONS” as in the figure below.

When the function ends the POW led stops flashing.
Instruments that have a display, you see the page “SYSTEM FUNCTIONS” as in the figure below.

:tip:Press FUNC button or F1 key to restart the controller.

If the function does not complete properly the POW stops and the ERR starts flashing.

The number of flashes indicates the type of error as shown in the table System Function Error Messages.



Error Messages

When a system function ends with an error, the number of led flashes led_lamp.jpg err indicates the type of error.
If there is a display, a message is given to describe the cause of the error.

System Function Error Messages
Error/Number of ERR led flashesMessage
1 Generic error
2 Open/Exist/Create file error
3 Read file error
4 Write file error
5 Out of Memory error
6 QMos Version error
7 Checksum Error
8 Symbols checksum No Match
9 Configuration / Symbols error
10 File format error
11 Format error
12 Device not present or unformatted
13 Application not present error
14 Touch calibration failure
15 File compression type not support
16 Target don't match project !
17 Fw version don't match project !
18 File copy error
19 File size error
20 Crypt operation error
21 Invalid Product Serial Number
22 Function is locked
23 Function not enabled

Descrizione delle funzioni

Reset Error Checksum

Le variabili ritentive sono sottoposte dal sistema ad un controllo di integrità mediante applicazione di un CRC alla memoria dati non volatile. Ciò permette di rilevarne l'eventuale corruzione ed impedire l'avvio dell'applicazione segnalando la situazione con il lampeggio del led led_lamp.jpgerr come riportatosu Segnalazioni del led err.
Per poter far funzionare nuovamente l'applicazione è necessario eseguire un nuovo download dell'applicazione con l'ambiente di sviluppo, oppure eseguire la funzione di sistema “Reset Error Checksum”. Queste operazioni cancellano lo stato di errore ed azzera tutte le variabili ritentive.

La procedura esegue le seguenti fasi:

  • Verifica dello stato di errore e termine della funzione se non è presente nessun errore.
    Nei prodotti microQMove viene anche verificata la presenza applicativo QCL.
  • Vengono azzerati i dati ritentivi e viene visualizzato il messaggio “Clear power down data…” fino al termine della procedura.
  • Termine operazione

Copy all files DEVICE -> NAND

Questa procedura permette di copiare tutti i files presenti nella root e nella directory “DS” della memoria di massa esterna removibile MMC/SD o USB nella memoria di massa interna NAND.

La seguente tabella riporta la sequenza delle operazioni eseguite e gli eventuali possibili errori:

MessaggioDescrizionePossibili errori
Check DEVICE presenceControllo presenza dispositivo memoria di massa esterno
Su DEVICE compare MMC o USB, a seconda di cosa è stato selezionato
Device not present or unformatted
Mounting device…Caricamento del dispositivo di memoria di massa esternaDevice not present or unformatted
Searching files…Ricerca file in corsoNo Files Found
Copy <filename>….Esegue la copia dei files indicando il nome di quello attualmente in copia

Copy all files NAND -> DEVICE

Questa procedura permette di copiare tutti i files presenti nella root e nella directory “DS” della memoria di massa interna NAND nella memoria di massa esterna removibile MMC/SD o USB.

La seguente tabella riporta la sequenza delle operazioni eseguite e gli eventuali possibili errori:

MessaggioDescrizionePossibili errori
Check DEVICE presenceControllo presenza dispositivo memoria di massa esterno
Su DEVICE compare MMC o USB, a seconda di cosa è stato selezionato
Device not present or unformatted
Mounting device…Caricamento del dispositivo di memoria di massa esternaDevice not present or unformatted
Searching files…Ricerca file in corsoNo Files Found
Copy <filename>….Esegue la copia dei files indicando il nome di quello attualmente in copia

Application delete

Esegue la cancellazione dell'applicazione azzerando la memoria dati non volatile, cancellando il programma QCL e, ove presente, cancellando il programma HMI.

La seguente tabella riporta la sequenza delle operazioni eseguite e gli eventuali possibili errori:

MessaggioDescrizionePossibili errori
Reset retentive dataAzzera la memoria dati non volatileWrite file error
Delete QCL applicationCancella il programma QCLWrite file error
Delete HMI applicationCancella il programma HMI (se presente il display)Write file error

Application upload from DEVICE

Esegue il caricamento di un'applicazione dal dispositivo di memoria di massa esterno MMC/SD o USB, alla memoria non volatile .

E' possibile caricare il programma QCL, il programma HMI ed i dati non volatili, uno solo di questi, due o tutti e tre.

Nel dispositivo di memoria di massa esterno MMC/SD o USB deve essere presente almeno uno dei seguenti files:

  • applic.bin per il compilato del programma QCL generato dall'ambiente di sviluppo QView;
  • applic.dat per il file dati generato dalla procedura “Save Data…” dell'ambiente di sviluppo Qview o dalla funzione di sistema Downl. retentive data to DEVICE;
  • appqtp.bin per il compilato del programma HMI generato dall'ambiente di sviluppo QPaint; esso viene generato tramite l'apposita funzione “Scarica il progetto su File…”.
MessaggioDescrizionePossibili errori
Check DEVICE presenceControllo presenza dispositivo memoria di massa esterno
Su DEVICE compare MMC o USB, a seconda di cosa è stato selezionato
Device not present or unformatted
Mounting device…Caricamento del dispositivo di memoria di massa esternaDevice not present or unformatted

Se presente il file applic.bin:

MessaggioDescrizionePossibili errori
Upload QCL applicationCaricamento programma QCLOpen/Exist/Create file error
Write file error
Read file error
Out of Memory Error
QMos Version Error
Checksum Error
Symbols checksum No Match
Configuration / Symbols Error

Se non presente il file applic.bin, un applicativo deve essere presente nella memoria non volatile altrimenti viene visualizzato il messaggio: “Application not present”.

Se presente il file applic.dat:

MessaggioDescrizionePossibili errori
Upload retentive dataCaricamento dati ritentivi nella memoria dati non volatileOpen/Exist/Create file error
Write file error
Read file error
Out of Memory Error
QMos Version Error
Checksum Error
Symbols checksum No Match
Configuration / Symbols Error
QTP File format error

La procedura esegue le seguenti fasi:

  • Verifica della presenza del dispositivo MMC/SD o USB.
    Viene visualizzato il messaggio “Check DEVICE presence”.
    Su DEVICE compare MMC o USB, a seconda di cosa è stato selezionato.
  • Caricamento del dispositivo MMC/SD o USB.
    Viene visualizzato il messaggio “Mounting device…”.
  • Caricamento del programma QCL (applic.bin) se presente nel dispositivo removibile
    Viene visualizzato il messaggio “Upload QCL application”.
  • Caricamento dei dati ritentivi del programma QCL (applic.dat) se presente nel dispositivo removibile
    Viene visualizzato il messaggio “Upload retentive data”.
    Nota: se il file applic.dat non viene rilevato, vengono mantenuti i dati presenti nel sistema purché i checksums Symbol e Configuration non siano variati. In caso contrario, i dati verranno tutti posti a zero.
  • Caricamento del programma HMI (appqtp.bin) se presente nel dispositivo removibile
    Viene visualizzato il messaggio “Upload HMI application”.
  • Chiusura del file e termine operazione.

System Settings

Questa procedura permette di impostare l'orologio/calendario di sistema e di selezionare il tipo di memoria esterna da utilizzare.

La voce Removable device non è presente negli hardware che non dispongono di una porta USB.
Premendo il tasto F2 o il pulsante BOOT si potrà introdurre un nuovo valore nei campi visualizzati. Ad ogni conferma del dato in introduzione, verrà posto in modifica il successivo campo. Al termine dell'ultimo campo, i dati introdotti verranno salvati.

Downl. retentive data to DEVICE

Questa funzione permette di creare un file sulla memoria di massa esterna (MMD/SD o USB) contenente i valori dei dati ritentivi.
Il file risultante, il cui nome è “applic.dat” è uguale a quello ottenuto dalla procedura “Save Data…” dell'ambiente di sviluppo QView. La funzione si può eseguire solamente se è presente un'applicazione QCL valida sullo strumento.

La procedura esegue le seguenti fasi:

  • Verifica della presenza del dispositivo MMC/SD o USB.
    Viene visualizzato il messaggio “Check DEVICE presence”.
    Su DEVICE compare MMC o USB, a seconda di cosa è stato selezionato.
  • Caricamento del dispositivo MMC/SD o USB.
    Viene visualizzato il messaggio “Mounting device…”.
  • Verifica della presenza del programma QCL
    Viene visualizzato il messaggio “Checking application presence…”.
  • Verifica di validità dei dati ritentivi
    Viene visualizzato il messaggio “Checking retentive data…”.
  • Apertura del file di destinazione “applic.dat” sul dispositivo removibile MMC/SD o USB
    Viene visualizzato il messaggio “Open destination file…”.
  • Scrittura dell'intestazione
    Viene visualizzato il messaggio “Write headers to destination file”.
  • Scrittura dei dati ritentivi
    Viene visualizzato il messaggio “Write data to destination file”.
    Nota: durante questa fase viene visualizzato il valore percentuale dell'operazione
  • Chiusura del file e termine operazione

Set NEW Password

Permette di modificare la password di accesso alle funzioni di sistema. La password è un valore numerico. La password di default è: 123 La procedura richiede prima l'introduzione della password attuale (Actual Pwd) e quindi, se corretta, permette l'introduzione della nuova password (New Pwd).

Al termine dell'introduzione della nuova password, viene visualizzato il messaggio “saving data…” che indica la memorizzazione del nuovo dato.

L'inserimento di una password uguale a 0 (zero) comporta la disabilitazione della richiesta di password.

Remove all files from NAND Flash

Cancella tutti i files presenti nella memoria di massa interna (NAND flash).
A differenza della funzione “Format NAND Flash” agisce a livello di filesystem e quindi può essere eseguita tutte le volte che è necessario.

La procedura esegue le seguenti fasi:

  • Calcolo del numero di files presenti nella memoria di massa interna.
  • Viene visualizzato il messaggio “Searching files…”.
  • Se il numero di files trovati è zero, viene visualizzato il messaggio “No Files Found” e la funzione termina, altrimenti viene visualizzato il messaggio “Delete <filename>” indicante la cancellazione di ogni file trovato.
  • Chiusura del dispositivo interno e termine operazione

Show NAND Flash files

Visualizza il nome e la dimensione di tutti i files presenti nella memoria di massa interna (NAND flash).

La procedura esegue le seguenti fasi:

  • Calcolo del numero di files presenti nella memoria di massa interna.
  • Viene visualizzato il messaggio “Searching files…”.
  • Se il numero di files trovati è zero, viene visualizzato il messaggio “No Files Found” e la funzione termina.
  • Per ogni file trovato viene visualizzato il nome del file stesso e la dimensione in bytes “<filename> - <size>B” di ogni singolo file trovato.
  • Viene quindi attesa la pressione del tasto di BOOT o del pulsante F2 per proseguire alla visualizzazione del prossimo file come visualizzato dal messaggio “Press BOOT or F2 to show next filename”
  • Chiusura del dispositivo interno e termine operazione

Touch Calibration

Questa procedura serve a tarare il dispositivo touch-screen, se presente.

All'ingresso della procedura, viene presentata una schermata in cui è presente una croce di colore blu.
Premere il centro della croce fino a quando la barra di progressione ha raggiunto il completamento.

A questo punto, compare la scritta “COMPLETED” ed è possibile rilasciare la pressione.

Nota: se la pressione viene rilasciata prima del completamento della barra di progressione, la procedura viene abortita e compare la scritta “!! OPERATION ABORTED !!”

Ripetere le operazioni per le altre 2 croci di colore verde e ciano.

Set Ethernet communic. parameter

Permette di visualizzare e modificare i parametri di comunicazione della porta ETHERNET.
All'accesso alla funzione compaiono tutti i dati memorizzati nello strumento.

Per modificare un parametro, premere il tasto F2 ed introdurre il nuovo valore.
Alla pressione del tasto ENTER viene posto in modifica il campo successivo.
Alla conferma dell'ultimo campo i dati vengono salvati e durante l'operazione viene visualizzato il messaggio “saving data…”

Nel caso la porta ethernet non sia presente sul hardware, viene visualizzato il messaggio “Function not enabled”.

Backup to NAND

La procedura di backup permette di creare, sotto forma di files memorizzati nel dispositivo NAND, una copia degli applicativi QCL e QTP in esecuzione e un'immagine dei dati ritentivi. I files creati hanno il nome di:

  • applic.qcy identifica il file contenente l'applicazione QCL (CPU)
  • appdat.qcy identifica il file contenente i dati ritentivi dell'applicazione QCL
  • appqtp.qcy identifica il file contenente l'applicazione QTP (HMI)

La procedura esegue le seguenti fasi:

  • Verifica della presenza applicazione QCL
    Viene visualizzato il messaggio “Checking application presence…”.
  • Creazione e scrittura in NAND del file di backup applicazione QCL: applic.qcy
    Viene visualizzato il messaggio “Write QCL application” e il valore percentuale dell'operazione.
  • Verifica della presenza e validità dei dati ritentivi dell'applicatizione QCL
    Viene visualizzato il messaggio “Checking retentive data…”.
  • Creazione e scrittura in NAND del file di backup dati ritentivi dell'applicazione QCL: appdat.qcy
    Viene visualizzato il messaggio “Write QCL data” e il valore percentuale dell'operazione.
  • Se lo strumento dispone di display, viene controllata la presenza dell' applicazione QTP:
    Se l'applicazione QTP è corretta, viene creato in NAND il file di backup applicazione QTP appqtp.qcy, viene visualizzato il messaggio “Write QTP application” e il valore percentuale dell'operazione;
    Se l'applicazione contiene errori, viene visualizzato il messaggio “QTP application error”;
    Se l'applicazione QTP non è rilevata, viene visualizzato il messaggio “QTP application not present”.
  • Termine della procedura e riavvio del sistema.

Restore from NAND

La procedura di restore permette di ripristinare, a partire dai files di backup memorizzati nel dispositivo NAND, gli applicativi QCL e QTP e un'immagine dei dati ritentivi.

La procedura esegue le seguenti fasi:

  • Viene visualizzato il messaggio “Restore NAND backup”.
  • Lettura da NAND del file di backup applicazione QCL: applic.qcy
    Viene visualizzato il messaggio “Upload QCL application”, il valore percentuale dell'operazione ed il numero di fase in esecuzione.
  • Lettura da NAND del file di backup dati ritentivi dell'applicazione QCL: appdat.qcy
    Viene visualizzato il messaggio “Upload retentive data” e il valore percentuale dell'operazione.
  • Se lo strumento dispone di display, viene controllata la presenza dell' applicazione QTP e se presente viene letto dal dispositivo NAND il file di backup applicazione QTP: appqtp.qcy.
    Viene visualizzato il messaggio “Upload HMI application”, il valore percentuale dell'operazione ed il numero di fase in esecuzione.
  • Termine della procedura e riavvio del sistema.

Nota alle funzioni di sistema Backup e Restore

L'utilizzo delle funzioni di sistema Backup to NAND e Restore from NAND permette di salvare (backup) e ripristinare (restore) un applicativo QMOVE.

Per le operazioni di backup e restore viene utilizzato il dispositivo di memoria interno NAND. La procedura di backup crea, sotto forma di file, una copia del programma QCL, del programma HMI (se lo strumento è provvisto di display) e un'immagine dei dati ritentivi.

I files creati sono:

  • applic.qcy contiene il programma QCL (QCL App)
  • appdat.qcy contiene l'immagine dei dati ritentivi (QCL Dat)
  • appqtp.qcy contiene il programma HMI (QTP App)

I files sono cifrati e solo lo strumento che li ha generati può eseguire la procedura di Restore in modo da salvaguardare una copia non autorizzata dei dati. La copia dei files di backup in un dispositivo esterno tipo MMC/SD o USB è possibile con l'utilizzo della funzione di sistema Copy all files NAND -> DEVICE. Sarà creata nel dispositivo MMC/SD o USB una cartella (directory) con il nome “QBK” che conterrà i files sopracitati. Allo stesso modo è possibile trasferire nello strumento i files di backup utilizzando la funzione di sistema Copy all files DEVICE -> NAND. In questo caso, nel dispositivo MMC/SD o USB, i files devono essere contenuti sempre nella cartella (directory) “QBK”.

Il backup/restore è una funzione importante, che può essere utilizzata nei seguenti casi:

  1. per ripristinare l'applicativo QMOVE ad una situazione certa (la situazione presente al momento del backup), se i dati sono stati manipolati da un operatore o se i dati macchina si sono alterati per un qualsiasi motivo.
  2. in fase di test di un nuovo applicativo, si può eseguire il backup della versione stabile. Nel caso in cui l'applicativo sotto test non soddisfi, con il comando restore è possibile ripristinare la versione stabile.

7.5 Informazioni per la programmazione

In questo capitolo sono raccolte tutte le informazioni relative al prodotto necessarie durante la programmazione, ovvero durante lo sviluppo di un applicativo QCL.

Ambienti di sviluppo

Per la programmazione del prodotto è necessario utilizzare gli ambienti QView-6 per la programmazione del codice QCL e se il prodotto è equipaggiato di display grafico, anche l'ambiente QPaint-6 per la progettazione delle pagine grafiche. Ambedue questi software sono contenuti in un pacchetto software che si chiama Qworkbench e che è liberamente scaricabile dal sito Qem (nella sezione “Supporto”).

Lo strumento è equipaggiato fisicamente da 3 slot. Gli slots da 4 a 32 sono comunque dichiarabili e devono venire utilizzati per indirizzare risorse che risiedono nei moduli Canopen.

Per utilizzare il terminale, in un prodotto che dispone di display, è necessario dichiarare nella sezione INTDEVICE il device MMIQ2.

INTDEVICE
   Hmi	MMIQ2	2

Per programmare con l'ambiente di sviluppo QPaint-6 è importante selezionare correttamente il target. Per fare questo all'interno dell'ambiente selezionare ProgettoConfigurazione del Target quindi selezionare in accordo con il codice di ordinazione il giusto strumento.

Un esempio di dichiarazione del BUS da utilizzare nella sezione BUS della unit di configurazione è:

BUS
   1	1P31F	10
   2	.	.
   3	1MG5F	.

Ovviamente la versione firmware deve coincidere ed il nome della scheda di specializzazione allo slot 3 deve essere corretto. Vedere il capitolo dedicato.

Memorie utilizzate

In questo paragrafo vedremo come è possibile rilevare una stima dell'utilizzo delle memorie nel prodotto. La memoria non volatile, disponibile per memorizzare il programma QCL, ha una capacità di 512KB.
La quantità di memoria occupata è pari alla dimensione del file .BIN generato dal Qview. La percentuale di memoria occupata è visualizzabile nel pannello CPU del Qview, alla voce “Used CODE memory”, oppure è possibile ottenere questa informazione dal valore del parametro “sizeapp” del device QMOS.

La memoria non volatile, disponibile per memorizzare il programma HMI ha una capacità 5.5MB.
La quantità di memoria occupata è pari alla dimensione del file .BIN generato da Qpaint, il cui valore (in bytes) è visualizzato nel parametro “memqtp” del device MMIQ2.

La memoria dati non volatile, disponibile per memorizzare le variabili ritentive, ha una capacità di 819KB.
La percentuale di memoria occupata è visualizzabile nel pannello CPU del Qview, alla voce “Used RETENTIVE”, oppure è possibile ottenere questa informazione dal valore del parametro “sizeret” del device QMOS.

La memoria dati volatile per memorizzare le variabili non ritentive ha una capacità dipendente da vari fattori (per esempio la dimensione dei programmi HMI e QCL, della pagina HMI in visualizzazione ecc.)
La memoria generale del sistema libera, disponibile come memoria dati volatile, è indicata dal parametro “memfree” nel device MMIQ2.

Porte di comunicazione

Le seriali PROG PORT e USER PORT implementano il protocollo di comunicazione proprietario QEM chiamato BIN1.

I device SERCOM e MODBUS sono utilizzabili con tutte le seriali di comunicazione compresa la PROG PORT. Il valore numerico da utilizzare durante la dichiarazione del device per selezionare il canale di comunicazione è il seguente:

  0		PROG PORT
  1		USER PORT
  2		AUX1 PORT
  3		AUX2 PORT    (se disponibile nell'hardware)

Quando i devices SERCOM e MODBUS utilizzano la PROG PORT o la USER PORT essi interessano il canale solo se lo stato di comunicazione del device è aperto (st_opencom = 1). Quando il canale del device viene chiuso (st_opencom = 0) nella seriale ritorna attivo il protocollo BIN1. Se si volesse forzare il protocollo BIN1 sulla porta PROG (ed impedire quindi che il device SERCOM occupi il canale) è necessario attivare il dip 6 di SW1.

Quando si utilizza il protocollo MODBUS RTU sulla porta seriale USER, AUX1 e AUX2 con la configurazione elettrica RS485, bisogna fare attenzione al fatto che quando la seriale è in trasmissione lo strumento mantiene attivo il canale (DE) per un tempo superiore a quello stabilito dalla specifica “MODBUS RTU”. Per questo bisogna considerare un tempo minimo di 5 millisecondi dopo i quali sarà possibile ricevere un nuovo messaggio. Anche il device SERCOM quando termina una trasmissione è soggetto al medesimo tempo in cui viene mantenuto il canale attivo (DE).

La porta di comunicazione Ethernet utilizza il protocollo di trasporto TCP/IP dove i pacchetti del protocollo BIN1 vengono incapsulati all'interno dei pacchetti dati TCP/IP. Sono attive due connessioni identificate da due porte di comunicazione liberamente impostabili nei parametri di comunicazione della porta Ethernet. Se lo strumento dispone di display, questi valori sono visualizzati e modificabili attraverso la funzione di sistema 12 - Set Ethernet communic. parameter. Altre modalità per visualizzare e impostare questi dati sono realizzabili attraverso appositi programmi disponibili all'interno dell'ambiente di sviluppo (QConfigurator-1 e QConfigurator-2).

La porta impostata in “Port nr.1:” rappresenta un canale di comunicazione equivalente alla PROG PORT. La porta impostata in “Port nr.2:” rappresenta un canale equivalente alla USER PORT. Le porte 3 e 4 non sono attualmente utilizzate.

La porta Ethernet può essere inoltre usata per instaurare una comunicazione di tipo Modbus TCP-IP con altri dispositivi in rete. In questo caso il canale che identifica la porta ethernet è impostabile inserendo il numero 43.

mdbs   MODBUS   2   43

I 3 canali di comunicazione della porta ethernet (due con protocollo BIN e uno MODBUS TCP/IP) possono essere attivi contemporaneamente.

Messaggi di errore del firmware

Durante il download dell'applicativo Qmove l'ambiente di sviluppo QView-6 può visualizzare alcuni errori non descritti nel manuale dell'ambiente di sviluppo. Tali errori sono particolari e la stringa descrittiva visualizzata dal QView-6 viene generata direttamente dal firmware.

Nella seguente tabella sono descritti i possibili messaggi di errore generati dal firmware.

Messaggi d'errore firmware
Possibili messaggi d'erroreDescrizione
Error: SYSTEM + ARRSYS + DATAGROUP + INTDEVICE size overflow by 234bytes.Compare quando le variabili ritentive superano il valore massimo consentito.
Error: serial port not avaliable in SERCOM or MODBUS device declaration.Compare quando Il valore numerico utilizzato durante la dichiarazione del device per selezionare il canale di comunicazione è errato.
Error: CANOPEN device required if you use more than 3 slots.Nella definizione del BUS si stanno utilizzando più di 3 slots e quindi l'applicazione richiede l'utilizzo di moduli Canopen. Per questa gestione è necessario dichiarare un device CANOPEN.
Error: incorrect bus fault mode in CANOPEN declaration.Nella dichiarazione del device CANOPEN si è indicata una modalità di fault (ultimo valore nella dichiarazione) non supportata.
Error: incorrect canbus speed in CANOPEN declaration.Nella dichiarazione del device CANOPEN si è indicata una velocità non valida.
Error: too much CANOPEN device declaration.Può essere dichiarato un solo device CANOPEN.
Error: absol. encoder resource num in ABSCNT device declar. is not avail.Nella dichiarazione del device ABSCNT si è indicata una risorsa che non esiste.
Error: COUNT in ABSCNT device declaration is not a simulated counter.L'indirizzo del contatore utilizzato nella dichiarazione del device ABSCNT non è di tipo simulato (es: 1.CNT01).
QMos version error. Unsupported instructions set.Una o più istruzioni nel progetto QCL non sono supportate dal firmware.
Error: compression file type not support.La compressione del programma QCL compilato non è supportata dal firmware.
Error: too mutch slots in bus declarations.Sono stati dichiarati nella sezione BUS più slot di quelli permessi dal tipo di hardware.

Variabili di sistema

L'ambiente di sviluppo mette a disposizione una serie di variabili predefinite che possono essere utilizzate precedendo al nome la parola chiave “QMOVE.”. Per esempio “QMOVE.is_suspend”, “QMOVE.sys001”, ecc. Lo scopo del presente paragrafo è illustrare le 16 variabili di sistema chiamate sys001÷sys016 il cui significato dipende dal firmware che si sta utilizzando.

sys001

Questa variabile a sola lettura indica lo stato dei pulsanti FUNC (bit 0) e BOOT (bit 1). I valori possibili sono dunque:
0 = nessun pulsante premuto.
1 = pulsante FUNC premuto.
2 = pulsante BOOT premuto.
3 = pulsanti FUNC e BOOT premuti.

sys002

Questa variabile permette la lettura dell'immagine del dip-switch SW1. L'immagine viene acquisita solo all'accensione del prodotto. Il bit 0 corrisponde al dip 1 e così via.

NB: Alcuni dip non sono collegati al microprocessore e quindi viene letto sempre al livello logico 0.

sys003

Questa variabile permette il comando del led L1-L2-L3-L4. Il bit 0 corrisponde a L1, il bit1 a L2 e così via.

sys004

Questa variabile permette l'impostazione del filtro anti-glitch ai segnali delle fasi nei contatori bidirezionali. Il valore è espresso in KHz e si riferisce alla frequenza del segnale di una fase. Il range di valori ammesso è 30÷220. Il valore impostato di default é 220KHz. La variabile può essere anche riletta. La modifica del filtro può essere fatta in qualsiasi momento.

sys005÷16

Non utilizzata.

7.5.1 I devices

Con il termine device si identifica una categoria di dispositivi software atti a svolgere attività di supporto e di controllo, più o meno complesse, per risolvere le problematiche legate all'automazione dei sistemi.
La lista dei devices implementati nel firmware dipende dalla versione firmware. Lo scopo del presente paragrafo è quello di illustrare la lista e le caratteristiche dei devices disponibili.

Il firmware versione 10 implementa i seguenti devices:

Nome deviceTempo di campionamento
minimo (msec)
Tempo di campionamento
massimo (msec)
Tempo di esecuzione (%)
ABSCNT12508,31
ANINP125014,25
CALENDAR--0
CANOPEN1250100
COUNTER312505,94
DAC--0
DATASTORE12090,5
FREQ12504,75
MMIQ211090,5
MODBUS125032,07
QMOS--0
RECDATA12505,34
SERCOM12509,26

Il firmware versione 20 implementa anche i seguenti devices:

Nome deviceTempo di campionamento
minimo (msec)
Tempo di campionamento
massimo (msec)
Tempo di esecuzione (%)
ANPOS212508,31
EANPOS125055,94
HEAD2125023,75
OOPOS3125027,91

Il firmware versione 30 implementa anche i seguenti devices:

Nome deviceTempo di campionamento
minimo (msec)
Tempo di campionamento
massimo (msec)
Tempo di esecuzione (%)
CAMMING3125055,94
INTERP125035,63
JOINT1)125095,01

1) Il tempo di campionamento effettivo risulta essere doppio rispetta a quello impostato

Particolarità dei devices

In questo paragrafo vengono descritte delle informazioni aggiuntive sui devices. Queste informazioni integrano e completano il manuale di uso del device disponibile nel sito Qem. Sono informzioni relative all'implementazione del device in questo particolare prodotto.

CANOPEN

Se nella dichiarazione del device CANOPEN viene indicata la velocità zero allora essa diventa impostabile tramite dip di SW1.
Il primo slot per indirizzare risorse che risiedono all'interno di moduli Canopen è il 4.
Il firmware gestisce la cattura dell'ingresso in interruzione anche se questo è situato in un modulo Canopen.
E' possibile inserire il valore 2 nella dichiarazione del device sul campo relativo alla porta. Questa impostazione rende possibile lo startup dei drive DS402 tramite una richiesta QCL (QDO numero 10). Questa funzionalità si rende necessaria nei casi in cui ci siano dei drive senza ingresso di abilitazione e con l'alimentazione della parte logica in comune con l'alimentazione di potenza. Se la potenza è spenta il drive non comunica in CANOPEN poichè anche la parte logica è spenta.

DATASTORE

I files manipolati dal device DATASTORE sono tutti contenuti nella cartella /DS. Se questa cartella non esiste nel dispositivo essa viene creata automaticamente. Il device DATASTORE può operare sia con il dispositivo MMC/SD o USB che con una memoria tipo NAND interna al prodotto (non removibile). Per definire con quale dispositivo operare viene utilizzato il valore del parametro priority (0=MMC/SD, 1=NAND, 2=USB). Se l'applicazione deve frequentemente accedere ai due dispositivi supportati e non è richiesta la rimozione fisica del dispositivo MMC/SD o USB, è possibile utilizzare una particolare impostazione del parametro priority che evita di eseguire continuamente il MOUNT UMOUNT dei dispositivi. In pratica quando si desidera cambiare dispositivo prima di eseguire il comando UMOUNT si imposta “priority = -1”. Questo fa si che internamente al device la fase UMOUNT venga evitata rendendo il successivo comando MOUNT al medesimo dispositivo molto rapido.

Un esempio di codice QCL per cambiare dispositivo potrebbe essere:

SUB SETMMC
  WAIT NOT data.st_busy
  IF data.st_mount
    data.priority = -1
    data.UMOUNT
    WAIT NOT data.st_mount
    CALL CHECK_ERR_WRN
  ENDIF
  data.priority = 0
  data.MOUNT
  WAIT data.st_mount
ENDSUB
 
SUB SETNAND
  WAIT NOT data.st_busy
  IF data.st_mount
    data.priority = -1
    data.UMOUNT
    WAIT NOT data.st_mount
    CALL CHECK_ERR_WRN
  ENDIF
  data.priority = 1
  data.MOUNT
  WAIT data.st_mount
  CALL CHECK_ERR_WRN
ENDSUB

Esiste una particolare impostazione dei parametri che permette di verificare l'esistenza di un file nel dispositivo. Si utilizza il parametro “filenum” impostato al valore -1 e con il comando OPENFILE il device invece di aprire il file ricerca il primo file presente nella directory “/DS/” del dispositivo scelto. Quando trovato, il nome di tale file sarà impostato dal device nel parametro “filenum” stesso (ed il tipo nel parametro “filetype”). Impostando nuovamente -1 in “filenum” ed eseguendo il comando OPENFILE verrà cercato il nome del file successivo e così via. Ogniqualvolta verrà effettuata una operazione di OPENFILE con il filenum diverso da -1 il loop di ricerca verrà chiuso. Quando la ricerca sarà terminata e non vi saranno più file presenti, allora il device imposterà come risposta al comando OPENFILE “filenum = -2”. L'avvenuta esecuzione del comando sarà segnalata dal flag st_busy = 0. Se l'estensione del file non è HEX o CSV il file stesso viene ignorato dalla ricerca. Nel caso in cui il nome file non sia compatibile con quelli gestiti dal DATASTORE (numeri da 0 a 9999999) allora “filenum” rimarrà impostato a -1 e verrà segnalato un warning.

I parametri “disksize” e “diskfree” sono rappresentati in KB.

RECDATA

Il device può memorizzare un massimo di 10000 step.

QMOS

Il parametro “frwuvalue01” contiene il valore numerico del serial number del prodotto.

FREQ

Per definire l'ingresso associato al device FREQ utilizzare l'apposito campo numerico nella dichiarazione del device. La disponibilità di ingressi in frequenza deve essere verificata con la versione hardware del prodotto. Per ricavare la relazione tra valore numerico e pin del morsetto utilizzare le informazioni contenute nella colonna “Indirizzo” nelle tabelle di illustrazione del morsetto.

CAMMING3

I parametri relativi ai settori (CodeQm, CodeQs…) non sono ritentivi. All'accensione essi assumono sempre valore 0.

8. Accessori disponibili